home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7667 < prev    next >
Encoding:
Text File  |  1996-08-05  |  811 b   |  27 lines

  1. Path: nnrp.info.ucla.edu!usenet
  2. From: philhong@ucla.edu (Phil Hong)
  3. Newsgroups: comp.lang.c++
  4. Subject: Need help with strings
  5. Date: Sat, 24 Feb 1996 23:49:50 GMT
  6. Organization: j%nki~wÇRJ3M-26XPLZ8L-BFGD44CT-1EA6BC82
  7. Message-ID: <312fa36c.20800130@news.ucla.edu>
  8. NNTP-Posting-Host: s195_14.resnet.ucla.edu
  9. X-Newsreader: Forte Agent .99d/32.182
  10.  
  11. Hi,
  12. I'm working on a school project right now and had a few questions
  13. about storing strings.
  14.  
  15. What I am trying to do is the following:
  16.  
  17. char* string;
  18. cin>>string;
  19. cout<<string;
  20.  
  21. However, I figured out that that this won't work but I am not sure of
  22. the reason.  Could someone explain what's going on here and also
  23. suggest a way that I can input and store a string of arbitrary length?
  24. Reply via email would be greatly appreciated.  Thanks.
  25. Phil Hong
  26. philhong@ucla.edu
  27.